home *** CD-ROM | disk | FTP | other *** search
/ Merciful 3 / Merciful_Release_3.bin / software / m / moneymattersv4.02.dms / in.adf / Install Money Matters < prev    next >
Text File  |  1996-01-10  |  39KB  |  1,638 lines

  1. ; $VER: Digita Money Matters 4.01 Installer Script 30/11/95
  2. ; English Language
  3. ;
  4. ; This section contains the Text strings for translation and
  5. ; appending to the code
  6. ;
  7. ; Copyright (C) Digita International
  8. ; By Mark Jackson
  9.  
  10. ;------------------------------------------------------
  11. ; ### Variable declarations
  12. (set #ProgName "Money Matters")
  13. (set #NumberInstallDisks 1)
  14. (set #InstallDisk "MoneyMattersInstall")
  15. (set #NumNewDisks 2)
  16. (set #DiskName "Money Matters")
  17. (set #FilesName "MM-Files")
  18. (set #RamTempFile "RAM:MMTemp")
  19. (set #RamUtils "RAM:MMUtils")
  20. (set #HDSpaceNeededBytes (* (* 1 1024) 1024)) ;1MB free
  21. (set #NumFonts 3)
  22. (set #Font1Name "DigitaSans.font")
  23. (set #Font2Name "DigitaSansBold.font")
  24. (set #Font3Name "NewTopaz.font")
  25. (set #DriverDest "DEVS:Printers")
  26. (set #ToolDest (cat #DiskName ":Money Matters"))
  27. (set #HelpTool "HELPPATH")
  28.  
  29. ;------------------------------------------------------
  30. ; ### String declaration
  31. ;// Drawer names
  32. (set #DrawerName "Money Matters")
  33. (set #SamplesName "Samples")
  34. (set #FontsName "Fonts")
  35. (set #LibsDefault "Libs")
  36.  
  37. ;------------------------------------------------------
  38. ;// Archive Names
  39. (set #ASLArchiveName "Asl.lha")
  40. (set #AmigaGuideArchiveName "Amigaguide.lha")
  41. (set #ProgArchiveName "MM.lha")
  42. (set #HelpArchiveName "Help.lha")
  43. (set #SamplesArchiveName "Samples.lha")
  44. (set #FontsArchiveName "Fonts.lha")
  45. (set #DevicesArchiveName "Devices.lha")
  46.  
  47. ;------------------------------------------------------
  48. ;// File Names
  49. (set #LibsSource (cat #InstallDisk ":libs"))
  50.  
  51. ;------------------------------------------------------
  52. ;// Message strings
  53. (set #BadKick
  54.     (cat #ProgName " requires Workbench 2.04 or above to work correctly.")
  55. )
  56.  
  57. (set #CheckStartup
  58.     (cat "\n\n\nPlease wait...\n\nThe installer is just checking your system.")
  59. )
  60.  
  61. (set #DestChoicePrompt
  62.     (cat "\n\n\nWhere would you like to install " #ProgName "?")
  63. )
  64.  
  65. (set #FloppyChoiceMsg
  66.     (cat "On floppy disks")
  67. )
  68.  
  69. (set #HardDiskChoiceMsg
  70.     (cat "On a hard disk")
  71. )
  72.  
  73. (set #DestChoiceHelp
  74.     (cat "\nSelect the radio button \"On a hard disk\" to "
  75.         "install " #ProgName " onto your hard disk.\n\n"
  76.         "Select the radio button \"On floppy disks\" to "
  77.         "install " #ProgName " onto a set of backup disks.\n\n\n"
  78.     )
  79. )
  80.  
  81. (set #HardDiskDestChoiceMsg
  82.     (cat "Where do you want to install the\n" #ProgName " drawer?")
  83. )
  84.  
  85. (set #HardDiskDestChoiceHelp
  86.     (cat "Select the drawer where you want to install " #ProgName
  87.         ", then click Proceed (a new drawer titled \"" #DrawerName
  88.         "\" will be created and will contain the " #ProgName " program.)"
  89.     )
  90. )
  91.  
  92. (Set #HDBootedFromFloppy
  93.     (cat "It appears you are installing to Hard-disk, but booted from the " #InstallDisk
  94.          " Floppy-disk, this will not work.\n\nPlease reset your Amiga with no floppy-disks "
  95.          "inserted so it boots from the hard-disk, then try installing " #ProgName " again."
  96.     )
  97. )
  98.  
  99. (set #NoDiskSpaceMsg1
  100.     (cat "\nThere is insufficient available space on your hard disk to install "
  101.         #ProgName ". You will need a minimum of "
  102.     )
  103. )
  104.  
  105. (set #NoDiskSpaceMsg2
  106.     (cat "MB of free disk space.\n\nEither click \"Abort Install\" to exit this "
  107.         "installation and delete some files from your hard disk, or click \"Proceed\" and try a "
  108.         "different partition."
  109.     )
  110. )
  111.  
  112. (set #DrawerExistsMsg
  113.     (cat "\nA drawer titled \"" #DrawerName "\" already exists in "
  114.         "the destination you have chosen.\n\nDo you wish to replace it "
  115.         "or choose a new destination?\n\n"
  116.     )
  117. )
  118.  
  119. (set #DrawerExistsChoice1 "Replace it")
  120.  
  121. (set #DrawerExistsChoice2 "Choose new destination")
  122.  
  123. (set #DrawerExistsHelp
  124.     (cat "\nYou have chosen a destination drawer which already has \""
  125.         #DrawerName "\" installed there.\n\nClick \""
  126.         #DrawerExistsChoice1 "\" to replace the contents with this new version "
  127.         "of " #ProgName ".\nClick \"" #DrawerExistsChoice2 "\" to choose a "
  128.         "new destination drawer.\n\n"
  129.         "If you choose \"" #DrawerExistsChoice1 "\" then please make sure you "
  130.         "have back up copies of any documents you wish to keep."
  131.     )
  132. )
  133.  
  134. (set #InstallChoice1 "Yes - Replace it")
  135.  
  136. (set #InstallChoice2 "No")
  137.  
  138. (set #OldASLLibraryMsg
  139.     (cat "You either do not have an ASL.library, or it is the wrong version. "
  140.         #ProgName " requires you have at least version 38 of this "
  141.         "library. Do you want to copy version 38 of the ASL.library?"
  142.     )
  143. )
  144.  
  145. (set #OldASLLibraryHelp
  146.     (cat #ProgName " will not work properly unless you have at least version 38 "
  147.         "of the ASL.library (Workbench 2.1 or above).\n\n"
  148.         "Choose \"" #InstallChoice1 "\" to copy version 38 of the library "
  149.         "and then install " #ProgName ".\nChoose \"" #InstallChoice2 "\" to not install "
  150.         "ASL.library version 38."
  151.     )
  152. )
  153.  
  154. (set #OldDiskFontLibraryMsg
  155.     (cat "You either do not have an DiskFont.library, or it is the wrong version. "
  156.         #ProgName " requires you have at least version 36 of this "
  157.         "library. Do you want to copy version 36 of the DiskFont.library?"
  158.     )
  159. )
  160.  
  161. (set #OldDiskFontLibraryHelp
  162.     (cat #ProgName " will not work properly unless you have at least version 36 "
  163.         "of the DiskFont.library (Workbench 2 or above).\n\n"
  164.         "Choose \"" #InstallChoice1 "\" to copy version 36 of the library "
  165.         "and then install " #ProgName ".\nChoose \"" #InstallChoice2 "\" to not install "
  166.         "DiskFont.library version 36 and quit this installer."
  167.     )
  168. )
  169.  
  170. (set #OldAmigaGuideLibraryMsg
  171.     (cat "You either do not have an AmigaGuide.library, or it is the wrong version. "
  172.         #ProgName " requires you have at least version 34.11 of this "
  173.         "library. Do you want to copy version 34.11 of the AmigaGuide.library?"
  174.     )
  175. )
  176.  
  177. (set #OldAmigaGuideLibraryHelp
  178.     (cat #ProgName " will not work properly unless you have at least version 34.11 "
  179.         "of the AmigaGuide.library.\n\n"
  180.         "Choose \"" #InstallChoice1 "\" to copy version 34.11 of the library "
  181.         "and then install " #ProgName ".\nChoose \"" #InstallChoice2 "\" to not install "
  182.         "AmigaGuide.library version 34.11."
  183.     )
  184. )
  185.  
  186. (set #OldLocaleLibraryMsg
  187.     (cat "You either do not have an Locale.library, or it is the wrong version. "
  188.         #ProgName " requires you have at least version 38 of this "
  189.         "library. Do you want to copy version 38 of the Locale.library?"
  190.     )
  191. )
  192.  
  193. (set #OldLocaleLibraryHelp
  194.     (cat #ProgName " will not work properly unless you have at least version 38 "
  195.         "of the Locale.library (Workbench 2.1 or above).\n\n"
  196.         "Choose \"" #InstallChoice1 "\" to copy version 38 of the library "
  197.         "and then install " #ProgName ".\nChoose \"" #InstallChoice2 "\" to not install "
  198.         "Locale.library version 38."
  199.     )
  200. )
  201.  
  202. (set #OldParseLibraryMsg
  203.     (cat "You either do not have an IffParse.library, or it is the wrong version. "
  204.         #ProgName " requires you have at least version 34 of this "
  205.         "library. Do you want to copy version 34 of the IffParse.library?"
  206.     )
  207. )
  208.  
  209. (set #OldParseLibraryHelp
  210.     (cat #ProgName " will not work properly unless you have at least version 34 "
  211.         "of the IffParse.library (Workbench 1.3 or above).\n\n"
  212.         "Choose \"" #InstallChoice1 "\" to copy version 34 of the library "
  213.         "and then install " #ProgName ".\nChoose \"" #InstallChoice2 "\" to not install "
  214.         "IffParse.library version 34."
  215.     )
  216. )
  217.  
  218. (set #InsertDiskMsg
  219.     (cat "\nPlease insert the disk labelled\n\n")
  220. )
  221.  
  222. (set #diskhelp
  223.     (cat "\nIf you know that the correct disk is in the drive, but you still cannot proceed, "
  224.         "then the name of the disk is incorrect.\n"
  225.         "Ensure that the disk name is not preceded by 'copy_of_', or blank spaces before or after the disk name.\n\n\n" @askdisk-help
  226.     )
  227. )
  228.  
  229. (set #Unpackmsg1 "Unarchiving ")
  230. (set #Unpackmsg2 " to ")
  231. (set #Unpackmsg3 "\n\nPlease wait...")
  232.  
  233. (set #ArchiveAbortMsg1
  234.     (cat "There was a problem when trying to dearchive '")
  235. )
  236.  
  237. (set #ArchiveAbortMsg2
  238.     (cat "'. Please try installing to a different drawer or partition, "
  239.         "or contact Digita Technical Support."
  240.     )
  241. )
  242.  
  243. (set #BlankDiskWarning
  244.     (cat "\nPlease insert a 'blank' disk in the internal\n"
  245.         "disk drive and click \"Proceed\" when ready."
  246.         "\n\nWARNING: This procedure will destroy all information "
  247.         "that may already be on the disk."
  248.     )
  249. )
  250.  
  251. (set #FloppyWarningHelp
  252.     (cat     "\nThis procedure uses the 'format' command to "
  253.         "wipe and prepare the disk in the internal disk drive "
  254.         "for use with Datastore."
  255.         "\n\nWrite-protect your master disks before making "
  256.         "backup copies and place the masters in a safe place."
  257.         "\n\nYou should also write-protect your backup disks "
  258.         "before clicking the \"Proceed\" button."
  259.     )
  260. )
  261.  
  262. (set #NotBlankMsg1
  263.     (cat "\nYou have the \"")
  264. )
  265.  
  266. (set #NotBlankMsg2
  267.     (cat "\" disk in your internal disk drive.\n\nPlease "
  268.         "replace this disk with a blank one, before "
  269.         "clicking the \"Proceed\" button."
  270.     )
  271. )
  272.  
  273. (set #FormatWorkingMsg
  274.     (cat "Please wait... Formatting a disk.")
  275. )
  276.  
  277. (set #FormatError
  278.     (cat     "\nAn error occured when trying to format this disk.\n\n"
  279.         "Please ensure that the disk is in the disk drive "
  280.         "before you click the \"Proceed\" button or "
  281.         "put another disk in the drive and try again."
  282.     )
  283. )
  284.  
  285. (set #FormatErrorHelp
  286.     (cat "\nAn error has occured during the formatting of "
  287.         "your disk. This could be for many reasons, but more "
  288.         "commonly, either the disk was corrupt or the drive was "
  289.         "faulty.\nPlease try a different disk, check the drive "
  290.         "and then if the problem persists, contact the Technical "
  291.         "Support Department. Information on how to get Support is "
  292.         "explained in the manual."
  293.     )
  294. )
  295.  
  296. (set #FormatCompleteMsg1
  297.     (cat " created.\n\nPlease take out the disk "
  298.         "in the internal disk drive and label it \""
  299.     )
  300. )
  301.  
  302. (set #FormatCompleteMsg2
  303.     (cat "\", then click the \"Proceed\" button.")
  304. )
  305.  
  306. (set #FormatChoiceprompt
  307.     (cat "\n" #ProgName " needs to format and name two disks during installation. "
  308.         "For more information click 'Help'. Do you wish to:"
  309. ))
  310.  
  311. (set #FormatChoicemsg1 "Slow Format Some Blank Disks")
  312.  
  313. (set #FormatChoicemsg2 "Quick Format Some Blank Disks")
  314.  
  315. (set #FormatChoice-Help
  316.     (cat "This installation utility needs to prepare two disks before installing "
  317.         #ProgName ". Before each disk is created, it will be formatted and named. "
  318.         "\n\nChoose '" #FormatChoicemsg1 "' if you wish to perform a full format, or \nchoose "
  319.         "'" #FormatChoicemsg2 "' to perform a quick format on disks that must have been "
  320.         "previously formatted as Fast File System disks."
  321. ))
  322.  
  323. (set #FloppyFinishedMsg
  324.     (cat "\nAfter clicking the 'Proceed' button, place the \"" #DiskName
  325.         "\" disk in the internal disk drive and reset your Amiga.\n"
  326.     )
  327. )
  328.  
  329. (set #WorkingMsg (cat "Please wait...\n\nInstalling " #ProgName))
  330.  
  331. (set #CreateDiskPrompt1 "\n\nDo you want to create the '")
  332. (set #CreateDiskPrompt2 "' disk?")
  333.  
  334. (set #ChoiceContinue "Yes")
  335.  
  336. (set #ChoiceSkip "Skip this part")
  337.  
  338. (set #CreateMainDiskHelp
  339.     (cat "\nThe '" #DiskName "' disk contains all the "
  340.         #ProgName " program files. \n\nIf you would like to create a "
  341.         #DiskName " disk then click '" #ChoiceContinue "'.\nIf you do "
  342.         "not want to create this disk then click '" #ChoiceSkip "'."
  343.     )
  344. )
  345.  
  346. (set #CreateFilesDiskHelp
  347.     (cat "\nThe '" #FilesName "' disk contains the Help file and"
  348.         " sample " #ProgName " files. \n\nIf you would like to create a "
  349.         #FilesName " disk then click '" #ChoiceContinue "'.\nIf you do "
  350.         "not want to create this disk then click '" #ChoiceSkip "'."
  351.     )
  352. )
  353.  
  354. (set #PrinterChoicePrompt
  355.     (cat "\n\nDo you wish to install a printer driver?"
  356.     )
  357. )
  358.  
  359. (set #PrinterChoicemsg1 "Yes")
  360. (set #PrinterChoicemsg2 "No")
  361.  
  362. (set #PrinterChoice-Help
  363.     (cat "To print from " #ProgName " you need to have the correct printer driver selected for your "
  364.          "printer.\nClick the '" #PrinterChoicemsg1 "' button if you wish to install a printer "
  365.          "driver, or the '" #PrinterChoicemsg2 "' button if you do not want to install a printer "
  366.          "driver."
  367.     )
  368. )
  369.  
  370.  
  371. (set #AskLocaleCmd "Assign >NIL: LOCALE: RAM:")
  372.  
  373. (set #AskLocaleMsg
  374.     (cat "For " #ProgName " to work properly, an assign has to be added "
  375.         "to your 'user-startup' script:\n\n'" #AskLocaleCmd "'\n\nClick "
  376.         "Proceed to continue."
  377.     )
  378. )
  379.  
  380. (set #AskLocaleHelp
  381.     (cat "For the Date and Time functions to work properly, an assign "
  382.         "for LOCALE needs to be added to your startup scripts.\n\nClick "
  383.         "Proceed if you want the installer to do this automatically, or "
  384.         "click 'Skip This Part' to not modify the user-startup."
  385.     )
  386. )
  387.  
  388.  
  389.  
  390. ;------------------------------------------------------
  391. ; ### Procedure declarations
  392.  
  393. ;------------------------------------------------------
  394. ;// routine to get disk specified in '#FileSourceDisk'
  395. (procedure @GetDisk
  396.     (
  397.         (askdisk
  398.             (prompt #InsertDiskMsg #FileSourceDisk)
  399.             (help #diskhelp)
  400.             (dest #FileSourceDisk)
  401.         )
  402.     )
  403. )
  404.  
  405.  
  406. ;------------------------------------------------------
  407. ;// Procedure to decompress file set in '#UnpackFile' to '#UnpackDest'
  408. (procedure @UnpackFiles
  409.     (
  410.       (working #Unpackmsg1 #UnpackFile #Unpackmsg2 #UnpackDest #Unpackmsg3)
  411.         (set ExpandName #UnpackFile)
  412.         (set #ArchiveError 0)
  413.         (set RunLhx
  414.             (cat "MMUtils:Lhx -I -m e \"" ExpandName "\" \"" #UnpackDest "\"")
  415.         )
  416.         (set #ArchiveError (run RunLhx))
  417.         (if (> #ArchiveError 0)
  418.             (cat
  419.                 (set #ArchiveAbortMsg (cat #ArchiveAbortMsg1 ExpandName #ArchiveAbortMsg2))
  420.                 (abort #ArchiveAbortMsg)
  421.             )
  422.         )
  423.     )
  424. )
  425.  
  426. ;------------------------------------------------------
  427. ;// Initial Checks
  428. (procedure @InitialChecks
  429.     (
  430.         ;// Check OS version
  431.         (working #CheckStartup)
  432.  
  433.         (set #OSVerNum (getversion))
  434.         (set #OSVersion (/ #OSVerNum 65536))
  435.  
  436.         (if (< #OSVersion 37)
  437.             (abort #BadKick)
  438.         )
  439.  
  440.         ;// Create temp file in ram: for files
  441.         (if (not (exists #RamTempFile))
  442.             (
  443.                 (makedir #RamTempFile (safe))
  444.             )
  445.         )
  446.  
  447.     (makeassign "MMTemp" #RamTempFile (safe))
  448.  
  449.         ;// Create temp file in ram: for utils
  450.         (if (not (exists #RamUtils))
  451.             (
  452.                 (makedir #RamUtils (safe))
  453.             )
  454.         )
  455.  
  456.     (makeassign "MMUtils" #RamUtils (safe))
  457.  
  458.     ;// Set flag if novice user
  459.     (set #UserNovice 0)
  460.     (if (= @user-level 0)
  461.       (
  462.         (set #UserNovice 1)
  463.       )
  464.     )
  465.       (copyfiles
  466.             (source (cat #InstallDisk ":Utils"))
  467.             (dest "MMUtils:")
  468.             (all)
  469.             (nogauge)
  470.             (optional "nofail")
  471.         )
  472.       ;// don't copy delete to MMUtils, as it is used to delete MMUtils!
  473.       (copyfiles
  474.             (source (cat #InstallDisk ":C"))
  475.             (dest "Ram:")
  476.             (pattern "delete")
  477.             (nogauge)
  478.             (optional "nofail")
  479.         )
  480.       (copyfiles
  481.             (source (cat #InstallDisk ":C"))
  482.             (dest "Ram:")
  483.             (pattern "assign")
  484.             (nogauge)
  485.             (optional "nofail")
  486.         )
  487.       (copyfiles
  488.             (source (cat #InstallDisk ":System"))
  489.             (dest "MMUtils:")
  490.             (pattern "format")
  491.             (nogauge)
  492.             (optional "nofail")
  493.         )
  494.     )
  495. )
  496.  
  497. ;------------------------------------------------------
  498. ;// Check that ASL library if from WB 2.1 (if not replace)
  499. (procedure @CheckASL
  500.     (
  501.         (set ASLVerNum (getversion (cat #LibsDefault ":ASL.library")))
  502.         (set ASLVer (/ ASLVerNum 65536))
  503.         (if (< ASLVer 38)
  504.             (
  505.         (if (= @user-level 2)
  506.             (
  507.                 (set InstallASLLibrary
  508.                   (askbool
  509.                        (prompt #OldASLLibraryMsg)
  510.                        (choices #InstallChoice1 #InstallChoice2)
  511.                        (help #OldASLLibraryHelp)
  512.                        (default 1)
  513.                   )
  514.                     )
  515.                 (if (= InstallASLLibrary 1)
  516.                      (
  517.                        (@InstallASL)
  518.                   )
  519.                 )
  520.               )
  521.               (
  522.                   (@InstallASL)
  523.               )
  524.             )
  525.           )
  526.         ) ;endif
  527.     )
  528. )
  529.  
  530. ;------------------------------------------------------
  531. ;// Procedure to install the asl library
  532. (procedure @InstallASL
  533.     (
  534.     (set #UnpackFile (cat #ArchiveLocation #ASLArchiveName))
  535.     (set #UnpackDest #LibsDest)
  536.  
  537.         (if (exists (cat #UnpackDest "asl.library"))
  538.             (delete (cat #UnpackDest "asl.library")
  539.                 (optional "force")
  540.             )
  541.         )
  542.     (@UnpackFiles)
  543.     )
  544. )
  545.  
  546. ;------------------------------------------------------
  547. ;// Check that Locale library is from WB 2.1 (if not replace)
  548. (procedure @CheckLocale
  549.     (
  550.         (set LocaleVerNum (getversion (cat #LibsDefault ":Locale.library")))
  551.         (set LocaleVer (/ LocaleVerNum 65536))
  552.         (if (< LocaleVer 38)
  553.             (
  554.         (if (= @user-level 2)
  555.             (
  556.                 (set InstallLocaleLibrary
  557.                   (askbool
  558.                        (prompt #OldLocaleLibraryMsg)
  559.                        (choices #InstallChoice1 #InstallChoice2)
  560.                        (help #OldLocaleLibraryHelp)
  561.                        (default 1)
  562.                   )
  563.                     )
  564.                 (if (= InstallLocaleLibrary 1)
  565.                      (
  566.                        (@InstallLocale)
  567.                   )
  568.                 )
  569.               )
  570.               (
  571.                   (@InstallLocale)
  572.               )
  573.             )
  574.           )
  575.         ) ;endif
  576.     )
  577. )
  578.  
  579. ;------------------------------------------------------
  580. ;// Procedure to install the locale library
  581. (procedure @InstallLocale
  582.     (
  583.         (if (exists (cat #LibsDefault ":locale.library"))
  584.             (
  585.                 (delete (cat #LibsDefault ":locale.library")
  586.                     (optional "force")
  587.                 )
  588.             )
  589.         )
  590.  
  591.         (copyfiles
  592.             (source #LibsSource)
  593.             (dest (cat #LibsDefault ":"))
  594.             (pattern "locale.library")
  595.             (optional "force")
  596.         )
  597.     )
  598. )
  599.  
  600.  
  601. ;------------------------------------------------------
  602. ;// Check that IFFParse library if from WB 1.3 (if not replace)
  603. (procedure @CheckParse
  604.     (
  605.         (set ParseVerNum (getversion (cat #LibsDefault ":iffparse.library")))
  606.         (set ParseVer (/ ParseVerNum 65536))
  607.         (if (< ParseVer 34)
  608.             (
  609.         (if (= @user-level 2)
  610.             (
  611.                 (set InstallParseLibrary
  612.                   (askbool
  613.                        (prompt #OldParseLibraryMsg)
  614.                        (choices #InstallChoice1 #InstallChoice2)
  615.                        (help #OldParseLibraryHelp)
  616.                        (default 1)
  617.                   )
  618.                     )
  619.                 (if (= InstallParseLibrary 1)
  620.                      (
  621.                        (@InstallParse)
  622.                   )
  623.                 )
  624.               )
  625.               (
  626.                   (@InstallParse)
  627.               )
  628.             )
  629.           )
  630.         ) ;endif
  631.     )
  632. )
  633.  
  634. ;------------------------------------------------------
  635. ;// Procedure to install the iffparse library
  636. (procedure @InstallParse
  637.     (
  638.         (if (exists (cat #LibsDefault ":iffparse.library"))
  639.             (
  640.                 (delete (cat #LibsDefault ":iffparse.library")
  641.                     (optional "force")
  642.                 )
  643.             )
  644.         )
  645.  
  646.         (copyfiles
  647.             (source #LibsSource)
  648.             (dest (cat #LibsDefault ":"))
  649.             (pattern "iffparse.library")
  650.             (optional "force")
  651.         )
  652.     )
  653. )
  654.  
  655.  
  656. ;------------------------------------------------------
  657. ;// Check that diskfont library is at least WB 2 (if not replace)
  658. (procedure @CheckDiskFont
  659.     (
  660.         (set DFVerNum (getversion (cat #LibsDefault ":diskfont.library")))
  661.         (set DFVer (/ DFVerNum 65536))
  662.         (if (< DFVer 36)
  663.             (
  664.         (if (= @user-level 2)
  665.             (
  666.                 (set InstallDiskFontLibrary
  667.                   (askbool
  668.                        (prompt #OldDiskFontLibraryMsg)
  669.                        (choices #InstallChoice1 #InstallChoice2)
  670.                        (help #OldDiskFontLibraryHelp)
  671.                        (default 1)
  672.                   )
  673.                     )
  674.                 (if (= InstallDiskFontLibrary 1)
  675.                      (
  676.                        (@InstallDiskFont)
  677.                   )
  678.                 ) ;end if
  679.               )
  680.               (
  681.                   (@InstallDiskFont)
  682.               )
  683.             ) ;end if
  684.           )
  685.         ) ;endif
  686.     )
  687. )
  688.  
  689. ;------------------------------------------------------
  690. ;// Procedure to install the diskfont library
  691. (procedure @InstallDiskFont
  692.     (
  693.         (if (exists (cat #LibsDefault "diskfont.library"))
  694.             (delete (cat #LibsDefault "diskfont.library")
  695.                 (optional "force")
  696.             )
  697.         )
  698.         (copyfiles
  699.             (source #LibsSource)
  700.             (dest (cat #LibsDefault ":"))
  701.             (pattern "diskfont.library")
  702.             (optional "force")
  703.         )
  704.     )
  705. )
  706.  
  707. ;------------------------------------------------------
  708. ;** Check that AmigaGuide library is at least version 34.11 (if not replace)
  709. (procedure @CheckAmigaGuide
  710.     (
  711.         (set AGVerNum (getversion (cat #LibsDefault ":amigaguide.library")))
  712.         (set AGVer (/ AGVerNum 65536))
  713.         (set AGRev (- AGVerNum (* AGVer 65536)))
  714.         (if (< AGVer 35)
  715.             (
  716.         (if (< AGRev 11)
  717.             (
  718.                 (if (= @user-level 2)
  719.                     (
  720.                         (set InstallAmigaGuideLibrary
  721.                           (askbool
  722.                                (prompt #OldAmigaGuideLibraryMsg)
  723.                                (choices #InstallChoice1 #InstallChoice2)
  724.                                (help #OldAmigaGuideLibraryHelp)
  725.                                (default 1)
  726.                           )
  727.                             )
  728.                         (if (= InstallAmigaGuideLibrary 1)
  729.                              (
  730.                                (@InstallAmigaGuide)
  731.                           )
  732.                         );end if
  733.                       )
  734.                       (
  735.                           (@InstallAmigaGuide)
  736.                       )
  737.                     ) ;end if (user-level)
  738.                   )
  739.                 ) ;end if (revision)
  740.           )
  741.         ) ;end if (version)
  742.     )
  743. )
  744.  
  745. ;------------------------------------------------------
  746. ;// Procedure to install amigaguide library
  747. (procedure @InstallAmigaGuide
  748.     (
  749.     (set #UnpackFile (cat #ArchiveLocation #AmigaGuideArchiveName))
  750.     (set #UnpackDest #LibsDest)
  751.         (if (exists (cat #UnpackDest "amigaguide.library"))
  752.             (delete (cat #UnpackDest "amigaguide.library")
  753.                 (optional "force")
  754.             )
  755.         )
  756.     (@UnpackFiles)
  757.   )
  758. )
  759.  
  760. ;------------------------------------------------------
  761. ;// Procedure to unprotect screen fonts if already present
  762. (procedure @UnProtectFonts
  763.     (
  764.         (set #Counter 0)
  765.         (while (< #Counter #NumFonts)
  766.         (
  767.             (set #FontName
  768.                 (select #Counter
  769.                     #Font1Name
  770.                     #Font2Name
  771.                     #Font3Name
  772.                 )
  773.             )
  774.             (set #CheckFont (tackon #FontsDest #FontName))
  775.             (if (exists #CheckFont)
  776.               (
  777.                 (protect #CheckFont "+r+w+e+d")
  778.               )
  779.             )
  780.           (set #Counter (+ #Counter 1))
  781.         )
  782.         )
  783.     )
  784. )
  785.  
  786. ;------------------------------------------------------
  787. ;// Procedure to de-archive screen fonts
  788. (procedure @DearchiveScreenFonts
  789.     (
  790.     (set #UnpackFile (cat #ArchiveLocation #FontsArchiveName))
  791.         (set #UnpackDest #FontsDest)
  792.         (@UnpackFiles)
  793.   )
  794. )
  795.  
  796. ;------------------------------------------------------
  797. ;// Install to HD or Floppy ?
  798. (procedure @CheckHDorFloppy
  799.     (
  800.         ;// Floppy or HD ?
  801.         (set #FullPath (expandpath "sys:"))
  802.         (if (= #FullPath (cat #InstallDisk ":"))
  803.             (set #DiskDefault 1)
  804.             (set #DiskDefault 0)
  805.         )
  806.  
  807.  
  808.     ;** set novice user to expert briefly
  809.     (set #UserNovice 0)
  810.     (if (= @user-level 0)
  811.       (
  812.         (user 2)
  813.         (set #UserNovice 1)
  814.       )
  815.     )
  816.       (set #DestinationType
  817.       (askchoice
  818.         (prompt #DestChoicePrompt)
  819.         (choices #HardDiskChoiceMsg
  820.              #FloppyChoiceMsg
  821.         )
  822.         (help #DestChoiceHelp)
  823.         (default #DiskDefault)
  824.       )
  825.     )
  826.     ;** set novice user back to novice
  827.     (if (= #UserNovice 1)
  828.       (user 0)
  829.     )
  830.  
  831.     (if (= #DestinationType 0)
  832.         (set #DestinationType "Hard")
  833.         (set #DestinationType "Floppy")
  834.     )
  835.     )
  836. )
  837.  
  838. ;------------------------------------------------------
  839. ;// Choose hard disk destination for Money Matters drawer
  840. (procedure @ChooseHDDest
  841.     (
  842.         ;** Find default drawer
  843.         (set #DefaultDest (getassign "Work" "d"))
  844.         (if (= #DefaultDest "")
  845.             (
  846.                 (set #DefaultDest (getassign "HD3" "d"))
  847.                 (if (= #DefaultDest "")
  848.                     (
  849.                         (set #DefaultDest (getassign "HD2" "d"))
  850.                         (if (= #DefaultDest "")
  851.                 (
  852.                 (set #DefaultDest (getassign "HD1" "d"))
  853.                 (if (= #DefaultDest "")
  854.                   (
  855.                     (set #DefaultDest (getassign "DH1" "d"))
  856.                     (if (= #DefaultDest "")
  857.                       (
  858.                         (set #DefaultDest (getassign "HD0" "d"))
  859.                         (if (= #DefaultDest "")
  860.                           (
  861.                             (set #DefaultDest "DH0:")
  862.                             (if (= #UserNovice 1)
  863.                               (user 2)
  864.                             )
  865.                           )
  866.                         )
  867.                       )
  868.                     )
  869.                   )
  870.                 )
  871.               )
  872.             )
  873.           )
  874.         )
  875.             )
  876.         )
  877.         ;** Ask for destination
  878.         (set #DestDrawer
  879.             (askdir
  880.                 (prompt #HardDiskDestChoiceMsg)
  881.                 (help #HardDiskDestChoiceHelp)
  882.                 (default #DefaultDest)
  883.             )
  884.         )
  885.     (if (= #UserNovice 1)
  886.       (user 0)
  887.     )
  888.     )
  889. )
  890.  
  891.  
  892. ;------------------------------------------------------
  893. ;// Find HD Destination and check enough space
  894. (procedure @FindHDDest
  895.     (
  896.         (set MMExists 0)
  897.     (while (= MMExists 0)
  898.             (
  899.           (@ChooseHDDest)
  900.           (while (< (getdiskspace #DestDrawer) #HDSpaceNeededBytes)
  901.             (
  902.               (if (< (getdiskspace #DestDrawer) #HDSpaceNeededBytes)
  903.                 (
  904.                             (if (= @user-level 0)
  905.                               (
  906.                                 (user 2)
  907.                                 (set #UserNovice 1)
  908.                               )
  909.                             )
  910.                   (message #NoDiskSpaceMsg1 (/ (/ #HDSpaceNeededBytes 1024) 1024) #NoDiskSpaceMsg2)
  911.                   (@ChooseHDDest)
  912.                 )
  913.                  )
  914.             )
  915.             ) ;end while
  916.             (@CheckExistsAlready)
  917.         )
  918.       );end while
  919.     (if (= #UserNovice 1)
  920.       (user 0)
  921.     )
  922.     )
  923. )
  924.  
  925. ;------------------------------------------------------
  926. ;// Procedure to check if Money Matters exists already in destination
  927. ;// Replace or choose again if so
  928. (procedure @CheckExistsAlready
  929.     (
  930.     (if (exists (tackon #DestDrawer #DrawerName))
  931.       (
  932.         (set ChooseAgainAnswer
  933.           (askbool
  934.             (prompt #DrawerExistsMsg)
  935.             (choices #DrawerExistsChoice1 #DrawerExistsChoice2)
  936.             (help #DrawerExistsHelp)
  937.             (default 1)
  938.           )
  939.         )
  940.         (if (= ChooseAgainAnswer 0)
  941.           (
  942.             (set MMExists 0)
  943.           )
  944.           (
  945.             (set MMExists 1)
  946.           )
  947.         )
  948.       )
  949.       (;else
  950.         (set MMExists 1)
  951.       )
  952.     );endif
  953.     )
  954. )
  955.  
  956. ;------------------------------------------------------
  957. ;// Create Money Matters drawers in chosen destination
  958. (procedure @CreateDrawers
  959.     (
  960.         (working #WorkingMsg)
  961.         (set #InsideHDDest (tackon #DestDrawer #DrawerName))
  962.         ;// Make the main Money Matters drawer
  963.         (makedir #InsideHDDest (infos))
  964.  
  965.         ;// Make the Samples drawer
  966.         (set #HDSamplesDest (tackon #InsideHDDest #SamplesName))
  967.         (makedir #HDSamplesDest (infos))
  968.     )
  969. )
  970.  
  971. ;------------------------------------------------------
  972. ;// set up hard drive destinations
  973. (procedure @SetUpHDProgDests
  974.     (
  975.         (working #WorkingMsg)
  976.         (set #ProgDest (cat #InsideHDDest "/"))
  977.         (set #HelpDest (cat #InsideHDDest "/"))
  978.         (set #ProgIcon (cat #ProgDest #ProgName))
  979.         (set #SamplesDest (cat #HDSamplesDest "/"))
  980.         (set #FontsDest "FONTS:")
  981.         (set #LibsDest "LIBS:")
  982.     )
  983. )
  984.  
  985. ;------------------------------------------------------
  986. ;// set up floppy disk destinations
  987. (procedure @SetUpFloppyProgDests
  988.     (
  989.         (set #ProgDest (cat #DiskName ":"))
  990.         (set #HelpDest (cat #FilesName ":"))
  991.         (set #SamplesDest (cat #FilesName ":" #SamplesName "/"))
  992.         (set #FontsDest (cat #DiskName ":" #FontsName "/"))
  993.         (set #LibsDest (cat #DiskName ":Libs/"))
  994.     )
  995. )
  996.  
  997.  
  998. ;------------------------------------------------------
  999. ;// Check to make sure that none of the Money Matters disks
  1000. ;// are in the internal drive before creating blank ones.
  1001. (procedure @CheckDisks
  1002.     (
  1003.         (set #NumberDisks (+ #NumberInstallDisks #NumNewDisks))
  1004.         (set #DiskBlank 1)
  1005.         (set n 0)
  1006.         (until (OR (= n #NumberDisks) (= #DiskBlank 0))
  1007.             (
  1008.                 (set #CheckMainDisk
  1009.                     (select n
  1010.                         #InstallDisk
  1011.                         #DiskName
  1012.                         #FilesName
  1013.                     )
  1014.                 )
  1015.                 (if (= (getassign "df0" "d") (cat #CheckMainDisk ":"))
  1016.                     (    ;disk is not blank
  1017.                         (set #DiskBlank 0)
  1018.                     )
  1019.                 )
  1020.                 (set n (+ n 1))
  1021.             )
  1022.         )
  1023.     )
  1024. )
  1025.  
  1026.  
  1027. ;------------------------------------------------------
  1028. ;// Format and name the disk given in #FormatMainDisk
  1029. (procedure @FormatDisk
  1030.     (
  1031.         (working #FormatWorkingMsg)
  1032.  
  1033.         (set #FormatMainDisk (cat "\"" #FormatMainDisk "\""))
  1034.  
  1035.         ;*** USE 2.0 FORMAT COMMAND ***
  1036.         (if (= #FormatChoice 0)
  1037.             (
  1038.                 (set #FormatCheck
  1039.                     (run ("MMUtils:Format drive=df0: name=%s FFS NOICONS" #FormatMainDisk))
  1040.                 )
  1041.             )
  1042.             (
  1043.                 (set #FormatCheck
  1044.                     (run ("MMUtils:Format drive=df0: name=%s FFS QUICK NOICONS" #FormatMainDisk))
  1045.                 )
  1046.             )
  1047.         )
  1048.  
  1049.         (if (OR (> #FormatCheck 0) (< #FormatCheck 0))
  1050.             (set #NoError 1)
  1051.             (set #NoError 0)
  1052.         )
  1053.     )
  1054. )
  1055.  
  1056. ;------------------------------------------------------
  1057. ;// routine to check disk in drive ok and format it if so
  1058. (procedure @Makedisk
  1059.     (
  1060.         (set #NoError 1)
  1061.         (while (= #NoError 1)
  1062.             (
  1063.                 ;** Make sure that the install disks are not in the drive
  1064.                 (run "MMUtils:Wait 5")  ;Wait a bit for disk access to stop
  1065.                 (@CheckDisks)
  1066.                 (if (= #DiskBlank 0)
  1067.                     (
  1068.                         (message #NotBlankMsg1 #CheckMainDisk #NotBlankMsg2)
  1069.                     )
  1070.                     (
  1071.                         (set #NoError 1)
  1072.                         (@FormatDisk)
  1073.                         (if (= #NoError 1)
  1074.                             (
  1075.                                 (message #FormatError (help #FormatErrorHelp))
  1076.                             )
  1077.                         )
  1078.                     )
  1079.                 )
  1080.             )
  1081.         )
  1082.     )
  1083. )
  1084.  
  1085.  
  1086. ;------------------------------------------------------
  1087. ;// Create floppy disk 1
  1088. (procedure @CreateDisk1
  1089.     (
  1090.     ;// Copy system files from install disk to Ram...
  1091.     (copyfiles
  1092.         (source (cat #InstallDisk ":Libs"))
  1093.         (dest "RAM:Libs")
  1094.         (all)
  1095.         (optional "force")
  1096.     )
  1097.     (copyfiles
  1098.         (source (cat #InstallDisk ":c"))
  1099.         (dest "RAM:c")
  1100.         (all)
  1101.         (optional "force")
  1102.     )
  1103.     (copyfiles
  1104.         (source (cat #InstallDisk ":l"))
  1105.         (dest "RAM:l")
  1106.         (all)
  1107.         (optional "force")
  1108.     )
  1109.     (copyfiles
  1110.       (source (cat #InstallDisk ":Devs"))
  1111.       (dest "RAM:Devs")
  1112.       (all)
  1113.       (optional "force")
  1114.     )
  1115.     (copyfiles
  1116.       (source (cat #InstallDisk ":prefs"))
  1117.       (dest "RAM:prefs")
  1118.       (all)
  1119.       (optional "force")
  1120.     )
  1121.  
  1122.     (copyfiles
  1123.       (source (cat #InstallName ":Locale"))
  1124.       (dest "RAM:Locale")
  1125.       (all)
  1126.       (optional "force")
  1127.     )
  1128.  
  1129.     (copyfiles
  1130.       (source (cat #InstallName ":S"))
  1131.       (dest "RAM:S")
  1132.       (all)
  1133.       (optional "force")
  1134.     )
  1135.  
  1136.     ;// Now create the first disk
  1137.       (message #BlankDiskWarning
  1138.           (help #FloppyWarningHelp)
  1139.       )
  1140.       (set #FormatMainDisk #DiskName)
  1141.     (@Makedisk)
  1142.  
  1143.     (run "MMUtils:Install2.1 df0:")
  1144.  
  1145.     ;// Now copy all files from RAM to disk 1, then delete them.
  1146.     (set #FileSourceDisk #DiskName)
  1147.     (@GetDisk)
  1148.  
  1149.     (copyfiles
  1150.         (source "RAM:Libs")
  1151.         (dest (cat #DiskName ":Libs"))
  1152.         (all)
  1153.         (optional "force")
  1154.     )
  1155.         (run "ram:delete RAM:Libs all" (safe))
  1156.  
  1157.     (copyfiles
  1158.         (source "RAM:l")
  1159.         (dest (cat #DiskName ":L"))
  1160.         (all)
  1161.         (optional "force")
  1162.     )
  1163.         (run "ram:delete RAM:l all" (safe))
  1164.  
  1165. (complete 20)
  1166.  
  1167.     (copyfiles
  1168.         (source "RAM:c")
  1169.         (dest (cat #DiskName ":C"))
  1170.         (all)
  1171.         (optional "force")
  1172.     )
  1173.         (run "ram:delete RAM:c all" (safe))
  1174.  
  1175.  
  1176.     (copyfiles
  1177.       (source "RAM:Devs")
  1178.       (dest (cat #DiskName ":Devs"))
  1179.       (all)
  1180.       (optional "force")
  1181.     )
  1182.         (run "ram:delete RAM:Devs all" (safe))
  1183.  
  1184.     (copyfiles
  1185.       (source "RAM:prefs")
  1186.       (dest (cat #DiskName ":Prefs"))
  1187.       (all)
  1188.       (optional "force")
  1189.     )
  1190.         (run "ram:delete RAM:prefs all" (safe))
  1191.  
  1192.     (copyfiles
  1193.       (source "RAM:Locale")
  1194.       (dest (cat #DiskName ":Locale"))
  1195.       (all)
  1196.       (optional "force")
  1197.     )
  1198.         (run "ram:delete RAM:Locale all" (safe))
  1199.  
  1200.     (copyfiles
  1201.       (source "RAM:S")
  1202.       (dest (cat #DiskName ":S"))
  1203.       (all)
  1204.       (optional "force")
  1205.     )
  1206.         (run "ram:delete RAM:S all" (safe))
  1207.  
  1208.         ;## Now install other devices
  1209.         ;## DISK SWAP to get rest of archives
  1210.     (set #FileSourceDisk #InstallDisk)
  1211.     (@GetDisk)
  1212.  
  1213.  
  1214.     ;// ... some archives...
  1215.     (copyfiles
  1216.             (source (cat #InstallDisk ":Archive"))
  1217.             (dest "MMTemp:")
  1218.             (pattern ("(MM.lha|Devices.lha|Fonts.lha|Asl.lha|Amigaguide.lha)"))
  1219.             (optional "force")
  1220.           (safe)
  1221.         )
  1222.  
  1223.  
  1224.         ;## DISK SWAP back again to dearchive to disk
  1225.     (set #FileSourceDisk #DiskName)
  1226.     (@GetDisk)
  1227.  
  1228.     (set #UnpackFile (cat #ArchiveLocation #DevicesArchiveName))
  1229.     (set #UnpackDest (cat #DiskName ":Devs/"))
  1230.     (@UnpackFiles)
  1231.         (run (cat "ram:delete " #ArchiveLocation #DevicesArchiveName) (safe))
  1232.  
  1233. (complete 30)
  1234.  
  1235.         (@DearchiveScreenFonts)
  1236.         (run (cat "ram:delete " #ArchiveLocation #FontsArchiveName) (safe))
  1237.  
  1238.         (@InstallASL)
  1239.         (run (cat "ram:delete " #ArchiveLocation #ASLArchiveName) (safe))
  1240.  
  1241.         (@InstallAmigaGuide)
  1242.         (run (cat "ram:delete " #ArchiveLocation #AmigaGuideArchiveName) (safe))
  1243.  
  1244. (complete 40)
  1245.  
  1246.         (@InstallProg)
  1247.         (run (cat "ram:delete " #ArchiveLocation #ProgArchiveName) (safe))
  1248.  
  1249. (complete 50)
  1250.  
  1251.         (tooltype
  1252.             (dest "Money Matters:Money Matters")
  1253.             (settooltype #HelpTool (cat #FilesName ":"))
  1254.         )
  1255.  
  1256. (complete 60)
  1257.  
  1258.     )
  1259. )
  1260.  
  1261. ;------------------------------------------------------
  1262. ;// Create floppy disk 2
  1263. (procedure @CreateDisk2
  1264.     (
  1265.     (set #FileSourceDisk #InstallDisk)
  1266.     (@GetDisk)
  1267.     (copyfiles
  1268.             (source (cat #InstallDisk ":Archive"))
  1269.             (dest "MMTemp:")
  1270.             (pattern ("(Samples.lha|Help.lha)"))
  1271.             (optional "force")
  1272.           (safe)
  1273.         )
  1274.  
  1275.         ;// Now create the second disk
  1276.       (message #BlankDiskWarning
  1277.           (help #FloppyWarningHelp)
  1278.       )
  1279.       (set #FormatMainDisk #FilesName)
  1280.       (@Makedisk)
  1281.  
  1282. (complete 70)
  1283.  
  1284.         ;// Create the drawers with icons.
  1285.     (makedir (cat #FilesName ":" #SamplesName) (infos))
  1286.  
  1287.     ;// Now copy all files from RAM to disk 2, then delete them.
  1288.     (set #FileSourceDisk #FilesName)
  1289.     (@GetDisk)
  1290.  
  1291.         (@InstallSamples)
  1292.         (run (cat "ram:delete " #ArchiveLocation #SamplesArchiveName) (safe))
  1293.  
  1294. (complete 80)
  1295.  
  1296.         (@InstallHelp)
  1297.         (run (cat "ram:delete " #ArchiveLocation #HelpArchiveName) (safe))
  1298.     )
  1299. )
  1300.  
  1301. ;------------------------------------------------------
  1302. ;// Install program files
  1303. (procedure @InstallProg
  1304.     (
  1305.         (working #WorkingMsg)
  1306.         (set #UnpackFile (cat #ArchiveLocation #ProgArchiveName))
  1307.         (set #UnpackDest #ProgDest)
  1308.         (@UnpackFiles)
  1309.   )
  1310. )
  1311.  
  1312. ;------------------------------------------------------
  1313. ;// Install help files
  1314. (procedure @InstallHelp
  1315.     (
  1316.         (working #WorkingMsg)
  1317.         (set #UnpackFile (cat #ArchiveLocation #HelpArchiveName))
  1318.         (set #UnpackDest #HelpDest)
  1319.         (@UnpackFiles)
  1320.     )
  1321. )
  1322.  
  1323. ;------------------------------------------------------
  1324. ;// Install samples
  1325. (procedure @InstallSamples
  1326.     (
  1327.         (working #WorkingMsg)
  1328.         (set #UnpackFile (cat #ArchiveLocation #SamplesArchiveName))
  1329.         (set #UnpackDest #SamplesDest)
  1330.         (@UnpackFiles)
  1331.     )
  1332. )
  1333.  
  1334. ;------------------------------------------------------
  1335. ;// Install pictures
  1336. (procedure @InstallPictures
  1337.     (
  1338.         (working #WorkingMsg)
  1339.     (set #UnpackFile (cat #ArchiveLocation #PicsArchiveName))
  1340.     (set #UnpackDest #PicsDest)
  1341.     (@UnpackFiles)
  1342.     )
  1343. )
  1344.  
  1345. ;------------------------------------------------------
  1346. ;// Routine to install printer and fonts
  1347. (procedure @AddNewPrinter
  1348.     (
  1349.     (set #FileSourceDisk #InstallDisk)
  1350.     (@GetDisk)
  1351.  
  1352.     ;// Delete all in MMTemp: first...
  1353.         (run (cat "ram:delete MMTemp:#?" ) (safe))
  1354.     (set #ChosenDriver "Generic")
  1355.     (set #DriverSource (cat #InstallDisk ":Drivers"))
  1356.         (if (= #DestinationType "Floppy")
  1357.         (
  1358.             (set #DriverDest (cat #DiskName ":Devs/Printers"))
  1359.           )
  1360.           (
  1361.             (set #DriverDest "DEVS:Printers")
  1362.                 (set #CheckGeneric (cat #DriverDest "/" #ChosenDriver))
  1363.                 (if (exists #CheckGeneric)
  1364.                   (
  1365.                     (protect #CheckGeneric "+r+w+e+d")
  1366.                   )
  1367.                 )
  1368.           )
  1369.         )
  1370.  
  1371.     ;// Select printer (or driver) from list...
  1372.     (working #WorkingMsg)
  1373.     (set #SelectPrt
  1374.       (cat "MMUtils:select MMUtils:MMPrinterList")
  1375.     )
  1376.     (run #SelectPrt (safe))
  1377.     (set #ChosenDriver (getenv "wwDriver"))
  1378.     (working #WorkingMsg)
  1379.  
  1380.     ;// driver chosen so copy it to ram...
  1381.     (copyfiles
  1382.       (source #DriverSource)
  1383.       (dest #RamTempFile)
  1384.       (pattern #ChosenDriver)
  1385.       (optional "force")
  1386.       (nogauge)
  1387.     )
  1388.  
  1389.     ;// Now decompress Driver 'ChosenDriver' to destination '#RamTempFile'...
  1390.     (set #UnpackFile (tackon #RamTempFile #ChosenDriver))
  1391.     (set #UnpackDest "MMTemp:")
  1392.     (@UnpackFiles)
  1393.     (delete #UnpackFile)
  1394.  
  1395.     ;// get full uncompressed driver name...
  1396.     (run "c:List " #RamTempFile " LFORMAT %s >ENV:wwDriver")
  1397.     (set Driver (getenv "wwDriver"))
  1398.     (set DriverLen (strlen Driver))
  1399.     (set DriverLen (- DriverLen 1))
  1400.     (set #ChosenDriver
  1401.       (substr Driver 0 DriverLen)
  1402.     )
  1403.     ;// finally, copy driver to driver destination...
  1404.         (if (= #DestinationType "Floppy")
  1405.         (
  1406.             (set #FileSourceDisk #DiskName)
  1407.             (@GetDisk)
  1408.         )
  1409.     )
  1410.     (copyfiles
  1411.       (source #RamTempFile)
  1412.       (dest #DriverDest)
  1413.       (pattern #ChosenDriver)
  1414.       (optional "force")
  1415.     )
  1416.   )
  1417. )
  1418.  
  1419. ;------------------------------------------------------
  1420. ;// Delete any files from Ram and temporary Ram Drawer
  1421. (procedure @CleanUp
  1422.     (
  1423.     (working #WorkingMsg)
  1424.     (makeassign "MMTemp" (safe))
  1425.         (if (exists #RamTempFile)
  1426.         (
  1427.                 (set DeleteDrawer (cat "ram:delete " #RamTempFile " all force"))
  1428.                 (Run DeleteDrawer)
  1429.             )
  1430.         )
  1431.     (makeassign "MMUtils" (safe))
  1432.         (if (exists #RamUtils)
  1433.         (
  1434.                 (set DeleteDrawer (cat "ram:delete " #RamUtils " all force"))
  1435.                 (Run DeleteDrawer)
  1436.             )
  1437.         )
  1438.       (delete "Ram:delete"
  1439.           (optional "force")
  1440.       )
  1441.     )
  1442. )
  1443.  
  1444.  
  1445. ;------------------------------------------------------
  1446. ; ### Main
  1447. (complete 0)
  1448. (welcome)
  1449. (complete 5)
  1450. (@InitialChecks) ;// Copies relevent files to ram as well
  1451. (@CheckHDorFloppy)
  1452.  
  1453. (complete 10)
  1454.  
  1455. (if (= #DestinationType "Hard")
  1456.     (
  1457.         ;// HD
  1458.  
  1459.     ; Install to Hard-disk
  1460.     (if (= #FullPath (cat #InstallDisk ":"))
  1461.         (Abort #HDBootedFromFloppy)
  1462.     )
  1463.  
  1464.     (set #ArchiveLocation (cat #InstallDisk ":Archive/"))
  1465.  
  1466.     (set #FileSourceDisk #InstallDisk)
  1467.     (@GetDisk)
  1468.  
  1469.     (@SetUpHDProgDests)
  1470.     (@CheckASL)
  1471.     (@CheckLocale)
  1472.     (@CheckParse)
  1473.     (@CheckDiskFont)
  1474.     (@CheckAmigaGuide)
  1475.  
  1476.       ;## if WB2.0 and on Hard disk
  1477.         (if (= #OSVersion 37)
  1478.             (if (= (getassign "LOCALE") "")
  1479.                 (
  1480.                     ;no assign, so assign Locale to RAM:
  1481.                     (startup #ProgName
  1482.                         (prompt #AskLocaleMsg)
  1483.                         (help #AskLocaleHelp)
  1484.                         (command #AskLocaleCmd)
  1485.                     )
  1486.  
  1487.                     (run "Ram:Assign >NIL: LOCALE: RAM:")
  1488.                 )
  1489.             )
  1490.         )
  1491.  
  1492.  
  1493.         (@FindHDDest)
  1494. (complete 20)
  1495.         (@CreateDrawers)
  1496.  
  1497.         (@SetUpHDProgDests)
  1498.         (set @default-dest #DestDrawer)
  1499.         (@UnProtectFonts)
  1500. (complete 30)
  1501.         (@DearchiveScreenFonts)
  1502. (complete 40)
  1503.         (@InstallProg)
  1504.         (tooltype
  1505.             (dest #ProgIcon)
  1506.             (settooltype #HelpTool #HelpDest)
  1507.         )
  1508. (complete 50)
  1509.         (@InstallHelp)
  1510. (complete 60)
  1511.         (@InstallSamples)
  1512. (complete 70)
  1513.  
  1514.             ; Set default tool type for all Sample files
  1515.             (foreach #SamplesDest "#?"
  1516.                 (
  1517.                     (tooltype
  1518.                         (dest (cat #SamplesDest @each-name))
  1519.                         (setdefaulttool (cat #ProgDest #ProgName))
  1520.                     )
  1521.                 )
  1522.         )
  1523.  
  1524. (complete 80)
  1525.  
  1526.  
  1527.     )
  1528.     (
  1529.         ;// Floppy
  1530.       (set #ArchiveLocation "MMTemp:")
  1531.     (@SetUpFloppyProgDests)
  1532.         (if (>= @user-level 2) ;expert only
  1533.             (
  1534.                 (set #FormatChoice
  1535.                     (askchoice
  1536.                         (prompt #FormatChoiceprompt)
  1537.                         (choices #FormatChoicemsg1 #FormatChoicemsg2)
  1538.                         (help #FormatChoice-help)
  1539.                         (default 0)
  1540.                     )
  1541.                 )
  1542.             )
  1543.         )
  1544.  
  1545.         ;// if expert then check user wants to create disk 1
  1546.         (if (>= @user-level 2)
  1547.             (
  1548.                 (set #CreateDiskChoice
  1549.                     (askbool
  1550.                         (prompt (cat #CreateDiskPrompt1 #DiskName #CreateDiskPrompt2))
  1551.                         (choices #ChoiceContinue #ChoiceSkip)
  1552.                         (help #CreateMainDiskHelp)
  1553.                         (default 1)
  1554.                     )
  1555.                 )
  1556.             )
  1557.           (set #CreateDiskChoice 1)
  1558.         )
  1559.  
  1560.     (if (= @user-level 0)
  1561.       (
  1562.         (user 2)
  1563.         (set #UserNovice 1)
  1564.       )
  1565.     )
  1566.         (if (= #CreateDiskChoice 1)
  1567.             (@CreateDisk1)
  1568.         )
  1569.  
  1570.     (if (= #UserNovice 1)
  1571.       (
  1572.         (user 0)
  1573.       )
  1574.     )
  1575.  
  1576.         ;// if expert then check user wants to create disk 2
  1577.         (if (>= @user-level 2)
  1578.             (
  1579.                 (set #CreateDiskChoice
  1580.                     (askbool
  1581.                         (prompt (cat #CreateDiskPrompt1 #FilesName #CreateDiskPrompt2))
  1582.                         (choices #ChoiceContinue #ChoiceSkip)
  1583.                         (help #CreateFilesDiskHelp)
  1584.                         (default 1)
  1585.                     )
  1586.                 )
  1587.             )
  1588.           (set #CreateDiskChoice 1)
  1589.         )
  1590.  
  1591.     (if (= @user-level 0)
  1592.       (
  1593.         (user 2)
  1594.         (set #UserNovice 1)
  1595.       )
  1596.     )
  1597.         (if (= #CreateDiskChoice 1)
  1598.             (@CreateDisk2)
  1599.         )
  1600.  
  1601.     (if (= #UserNovice 1)
  1602.       (user 0)
  1603.     )
  1604.  
  1605.     (set @default-dest "")
  1606.     )
  1607. )
  1608.  
  1609. (complete 90)
  1610.  
  1611.     (set #InstallPrinter 1)
  1612.  
  1613.     (if (< #UserNovice 1) ; Intermediate or Expert only
  1614.         (
  1615.             (set #InstallPrinter
  1616.                 (askbool
  1617.                     (prompt #PrinterChoicePrompt)
  1618.                     (choices #PrinterChoicemsg1 #PrinterChoicemsg2)
  1619.                     (help #PrinterChoice-help)
  1620.                     (default 0)
  1621.                 )
  1622.             )
  1623.         )
  1624.     )
  1625.  
  1626. (if (= #InstallPrinter 1)
  1627.     (
  1628.         (@AddNewPrinter)
  1629.     )
  1630. )
  1631.  
  1632. (@CleanUp)
  1633. (complete 100)
  1634. (if (= #DestinationType "Hard")
  1635.     (exit)
  1636.     (exit #FloppyFinishedMsg)
  1637. )
  1638.